import 'package:cat_eye/util/loading_state_widget_util.dart';
import 'package:flutter/material.dart';

/*
* @Package: base
* @ClassName: base_chang_notifier
* @Author: szj
* @CreateDate: 7/28/21 10:38 AM
*/

class BaseChangNotifier with ChangeNotifier {
  bool _dispose = false;

  int type = LoadingWidget.LOADING;

  @override
  void dispose() {
    _dispose = true;
    super.dispose();
  }

  @override
  void notifyListeners() {
    //当页面销毁的时候，不刷新页面
    if (!_dispose) {
      super.notifyListeners();
    }
  }
}
